import greenfoot.*;  // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)

/**
 * Write a description of class Light here.
 * 
 * @author Christian Pérez Zavalija
 * @version 25-Jun-2013
 */
public class Light extends Actor
{
    private GreenfootImage ligth;
    
    /**
     * creates a green rectangle with set size.
     */
    public Light()
    {
        ligth=new GreenfootImage(4,28);
        ligth.setColor(java.awt.Color.green);
        ligth.fill();
        setImage(ligth);
    }
    
    /**
     * The light chance the color.
     * 
     * @param aColor a new color.
     */
    public void setColor(String aColor)
    {
        if(aColor=="white")
            ligth.setColor(java.awt.Color.WHITE);
        if(aColor=="black")
            ligth.setColor(java.awt.Color.black);
        ligth.fill();
        setImage(ligth);
    }
    
    /**
     * 
     */
    public void act() 
    {
        
    }    
}
